package com.sgcc.lms.bean;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;

/**
 * @Author: 李孟帅
 * @CreateTime: 2020-11-27 17:29
 * @Description:
 */
@Component
public class Dog implements InitializingBean, DisposableBean {
    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Dog(String name) {
        System.out.println("Dog ....constructor ... "+name);
        this.name = name;
    }

    public Dog(){
        System.out.println("Dog ....constructor ... ");
    }

    @Override
    public void destroy() throws Exception {
        System.out.println("Dog...destroy...");

    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println(this.name);
        System.out.println("Dog...afterPropertiesSet...");

    }
}
